<?php 
require_once (__DIR__ . "/../../models/Orders.php");
$results = Orders::GetAll();

?>
				<a href="<?= "$rootUrl/../W/Orders/create"?>"><b>Add...</b></a>
				<table class="table table-bordered table-condensed table-hover table-striped">
					<tr>
						<th>Order Date</th><th>Total</th><th>Actions</th>
					</tr>
					
					<?php while($row = $results->fetch_assoc()): ?>
						<tr>
							<td><?php echo $row['created_at']; ?></td> <td><?php echo $row['total'];?> </td>
							<td>
								<a href="<?= "$rootUrl/../W/Orders/details/$row[id]"?>">Details</a>
								<a href="<?= "$rootUrl/../W/Orders/edit/$row[id]"?>">Edit</a>
								<a href="<?= "$rootUrl/../W/Orders/delete/$row[id]"?>">Delete</a>
							</td>					
						</tr>
					<?php endwhile; ?>
					
				</table>